package com.quxian.chambercommerce.service.impl;

import com.quxian.chambercommerce.bean.PublicNoticeEntity;
import com.quxian.chambercommerce.dao.PublicNoticeDao;
import com.quxian.chambercommerce.searchCondition.CommonSearchBean;
import com.quxian.chambercommerce.service.PublicNoticeService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public class PublicNoticeServiceImpl implements PublicNoticeService {

    private PublicNoticeDao publicNoticeDao;

    public void setPublicNoticeDao(PublicNoticeDao publicNoticeDao) {
        this.publicNoticeDao = publicNoticeDao;
    }

    @Override
    public void addPublicNotice(PublicNoticeEntity entity) {

        publicNoticeDao.addPublicNotice(entity);
    }

    @Override
    public void deletePublicNoticeById(Integer id) {
        publicNoticeDao.deletePublicNoticeById(id);
    }

    @Override
    public void updatePublicNotice(PublicNoticeEntity entry) {
        publicNoticeDao.updatePublicNotice(entry);
    }

    @Override
    public List<PublicNoticeEntity> getPublicNoticeList() {
        List<PublicNoticeEntity> publicNoticeEntityList  = publicNoticeDao.getPublicNoticeList();

        return publicNoticeEntityList;
    }

    @Override
    public PublicNoticeEntity getPublicNoticeById(Integer id) {
       return publicNoticeDao.getPublicNoticeById(id);
    }

    @Override
    public List<PublicNoticeEntity> getPublicNoticeList(CommonSearchBean searchBean)
    {
    	return publicNoticeDao.getPublicNoticeList(searchBean);
    }
}
